<template>
    <div id="stumanger">
        <el-tree
                  :data="data"
                  :props="defaultProps"
                  :accordion="true"
                  :highlight-current="true"
                  :expand-on-click-node="true">
        </el-tree>
    </div>
</template>


<script>
    const axios = require('axios');
    export default {
        name: "stumanger",
        data() {
            return {
                data: [],
                defaultProps: {
                    children: 'children',
                    label: 'label'
                }
            };
        },
        methods: {
            handleNodeClick(data) {
                console.log(data);
            }
        },
        created() {
            axios.get('http://localhost/stuorder.php')
                .then((res) => {
                    this.data = res.data.data
                    console.log(res.data)
                    this.totals=res.data.row
                })
                .catch((err) => {
                    console.log(err)
                })
        }
    }
</script>